<include file="public@header" />
</head>
<body>
<div class="wrap">
    <ul class="nav nav-tabs">
        <li><a href="{:url('News/index')}">院部新闻</a></li>
        <li class="active"><a href="{:url()}">新闻修改</a></li>
    </ul>
    <form method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('News/editPost')}">
        <div class="form-group">
            <label for="input-title" class="col-sm-2 control-label">新闻标题<span class="form-required"></span></label>
            <div class="col-md-6 col-sm-10">
                <input type="text" class="form-control" id="input-title" name="title" value="{$res.title}">
            </div>
        </div>
        <div class="form-group">
            <label for="input-author" class="col-sm-2 control-label">作者<span class="form-required"></span></label>
            <div class="col-md-6 col-sm-10">
                <input type="text" class="form-control" id="input-author" name="author" value="{$res.author}">
            </div>
        </div>
        <div class="form-group">
            <label for="input-look-num" class="col-sm-2 control-label">浏览量<span class="form-required"></span></label>
            <div class="col-md-6 col-sm-10">
                <input type="text" class="form-control" id="input-look-num" name="look_num" value="{$res.look_num}">
            </div>
        </div>
        <div class="form-group">
            <label for="input-image" class="col-sm-2 control-label">新闻图片</label>
            <div class="col-md-6 col-sm-10">
                <input id="photo-1" type="hidden" name="image" >
                <input id="photo-1-name" type="text"  title="图片名称" value="{$res.image}" readonly disabled>
                <img id="input-image" style="width: 50px" >
                <a href="javascript:uploadOneImage('图片上传','#photo-1');" class="btn-primary btn">上传</a>
            </div>
        </div>
        <div class="form-group">
            <label for="input-description" class="col-sm-2 control-label">新闻摘要</label>
            <div class="col-md-6 col-sm-10">
                <textarea class="form-control" name="abstract" id="input-description" >{$res.abstract}</textarea>
            </div>
        </div>
        <div class="form-group">
            <label for="input-description" class="col-sm-2 control-label">新闻内容</label>
            <div class="col-md-6 col-sm-10">
                <script type="text/plain" id="content" name="content" value="{$res.content}">{$template|default=""|htmlspecialchars_decode}{$content}</script>
            </div>
        </div>

        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <button type="submit" class="btn btn-primary js-ajax-submit">修改</button>
                <a class="btn btn-default" href="javascript:history.back(-1);">{:lang('BACK')}</a>
            </div>
        </div>
        <div><input type="hidden" name="id" value="{$res.id}"></div>
    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
<script type="text/javascript">
    //编辑器路径定义
    var editorURL = GV.WEB_ROOT;
</script>
<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript">
    var editorcontent = new baidu.editor.ui.Editor();
    editorcontent.render('content');
</script>
</body>
</html>